package com.test.consumer.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


@Component
@FeignClient("PRODUCT-SERVICE")
public interface HelloFeignService {
    /**
     * @param name 参数一定要加注释， 不然不识别
     * @return
     */
    @GetMapping(value = "/hello/say")
    String sayHello(@RequestParam("name") String name);

    /**
     * @param name   参数一定要加注释， 不然不识别
     * @return
     */
    @GetMapping(value = "/feign/test")
    String feignTest(@RequestParam("name") String name);
}
